<div name="maincontent-forcomment">
<%if session[:user]%>
<% form_remote_for :comment, :url => { :controller => "comment", :action => "update_comment", :id => id, :div => div , :repo => repo}, :html=>{:multipart=>true}, :complete => "clearDiv('maincontent-forcomment')" do |form| %>
<table class="page-form" cellpadding="0" cellspacing="0">
<!--
  <tr>
    <td class="label"><label for="title"><%="Title".t%></label></td>
    <td class="field"><%= form.text_field :title,  :maxlength=>255, :size=>65 %></td>
  </tr>
-->  
  <tr>
    <td class="label body"><!--<label for="content"><%="Content".t%></label>--></td>
    <td class="field"><%= form.text_area :comment, :rows=>10,  :cols=>50 %></td>
  </tr>  
  <tr>
    <td class="label"></td>
    <td class="field"><%= submit_tag " Create ".t, :class => "button"  %></td>
  </tr> 
</table>
<br/>
<% end %>
<%else%>
<div class="basefontsize">
<%="Please login first".t%>:
<% form_tag '/account/login' do -%>
<p><label for="login"><%="Login".t%></label><br/>
<%= text_field_tag 'login' %></p>

<p><label for="password"><%="Password".t%></label><br/>
<%= password_field_tag 'password' %></p>

<!-- Uncomment this if you want this functionality
<p><label for="remember_me">Remember me:</label>
<%= check_box_tag 'remember_me' %></p>
-->

<p><%= submit_tag "Log in".t %> <%=link_to "Sign up".t, :controller => "account", :action => "signup" %></p>
</div>
<% end -%>
<%end%>
</div>